package com.chenshu.controller;

import com.chenshu.model.User;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2023-12-11
 * Time：21:31
 */
@Component
public class UserBeans {
    @Bean("stu_user1")
    public User user1() {
        User user = new User();
        user.setId(1);
        user.setName("Chenshu");
        return user;
    }
    @Bean("stu_user2")
    public User user2() {
        User user = new User();
        user.setId(1);
        user.setName("zhangsan");
        return user;
    }
    @Bean("stu_user3")
    public User user3() {
        User user = new User();
        user.setId(1);
        user.setName("lisi");
        return user;
    }
}
